
<form id="app-form" class="layui-form layuimini-form">
    <input type="hidden" name="field" value="system">
    <div class="layui-form-item">
        <label class="layui-form-label">前台台夜间模式</label>
        <?php $night_mode=sysconfig('system','night_mode'); ?>
        <div class="layui-input-block">
            <input type="radio" name="night_mode" value="1" title="开启" {if
                   condition="$night_mode eq 1" }checked{/if}>
            <input type="radio" name="night_mode" value="0" title="关闭" {if
                   condition="$night_mode eq 0" }checked{/if}>
        </div>
        <div class="layui-input-block">
            <tip>后台登录开启此功能后可混淆非法登陆者（显示验证码实则需要输入安全码）</tip>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">后台登录安全</label>
        <?php $security_code=sysconfig('system','security_code'); ?>
        <div class="layui-input-block">
            <input type="radio" name="security_code" value="2" title="使用安全码" {if
                   condition="$security_code eq 2" }checked{/if}>
            <input type="radio" name="security_code" value="1" title="使用验证码" {if
                   condition="$security_code eq 1" }checked{/if}>
            <input type="radio" name="security_code" value="0" title="都不使用" {if
                   condition="$security_code eq 0" }checked{/if}>
        </div>
        <div class="layui-input-block">
            <tip>后台登录开启此功能后可混淆非法登陆者（显示验证码实则需要输入安全码）</tip>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">后台安全目录</label>
        <div class="layui-input-block" style="width: 200px">
            <input type="text" name="safe_dir" value="{:sysconfig('system','safe_dir')}" placeholder="安全目录" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-input-block">
            <tip>设置安全目录后，你的后台地址为 {:WEB_ROOT.WEB_DOMAIN}/admin/logins/安全目录</tip>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">演示环境账号</label>
        <div class="layui-input-block" style="width: 200px">
            <input type="text" name="demo_username" value="{:sysconfig('system','demo_username')}" placeholder="演示环境账号" autocomplete="off" class="layui-input">
        </div>

    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">演示环境密码</label>
        <div class="layui-input-block" style="width: 200px">
            <input type="text" name="demo_password" value="{:sysconfig('system','demo_password')}" placeholder="演示环境密码" autocomplete="off" class="layui-input">
        </div>

    </div>
    <div class="layui-row">
        <div class="layui-col-md1">


    <?php $appDebug=env('app.debug');?>
        <input type="checkbox" lay-filter="setEnv" value="app.debug" {if $appDebug} checked {/if}
        lay-skin="switch" lay-text="debug开|debug关">
        </div>
        <div class="layui-col-md1">
        <?php $isDemo=env('laysns.is_demo');?>
        <input type="checkbox" lay-filter="setEnv"  value="laysns.is_demo" {if $isDemo} checked {/if}
        lay-skin="switch" style="margin-right:10px" lay-text="演示环境|生产环境">
        </div>
            <div class="layui-col-md1">
            <?php $isDemo=env('app.key');?>
            <a class="layui-btn layui-btn-xs" style="margin-top: 10px"  data-key="{:env('key')}" id="setKey"> updateKey</a>
            </div>

    </div>

    <div class="hr-line"></div>
    <div class="submit-info text-center">
        <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="system.config/save" data-refresh="false">确认</button>
        <a class="layui-btn layui-btn-primary layui-btn-sm" layform-close>关闭</a>
    </div>

</form>